#ifndef __COREFACTORY_H__
#define __COREFACTORY_H__
#include <map>
#include <string>
//#include "GAcore.hpp"
#include "Validator.hpp"
//#include "SimpleCore.hpp"
#include "GAframework.hpp"
//#include "MultiPopCore.hpp"
#include "GAmodSettings.hpp"
#include "common.hpp"
#include <cstdlib>


/** \class GAcoreException
 *  \brief Eccezioni lanciate dalla classe GAcore
 */
class CoreFactoryException : public EHW_Exception{
    public:
    /** Costruttore
     *  \sa EHW_Exception::EHW_Exception
     */
    CoreFactoryException(char *mess) : EHW_Exception(mess) {};
};


/** \class ECGAcore
 *  \brief This is a factory class to generate the evolvable core to be used.
 */
class CoreFactory
{

public:

enum CoreList {
	NotDefinedCore,
	SimpleCore,
	MultiPopCore,
	MultiPopCoreMT,
	CompactCore,
	MGAcore,
	ECGAcore
	};
typedef std::map<std::string,CoreList> t_mapStringCore;

private:
	t_mapStringCore s_mapStringCore;
	Validator* selected_validator;
	GAmodSettings selected_settings;
		
public:
	CoreFactory(Validator *val,GAmodSettings settings);
	GAcore* getNewGAcore(std::string corename) throw(CoreFactoryException);

};




#endif

